package com.ykg.mapper;

import com.ykg.pojo.Cabin;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 * 实体类：船舱
 * Created on 2021/6/21 18:52.
 *
 * @Author: zetong
 * @Description:
 */
@Mapper
@Repository
public interface CabinMapper {
    //查询所有船舱
    List<Cabin> findAll();

    //查询出某一船的船舱
    List<Cabin> findByShipId(Long shipId);

    //查询出某一船的船舱
    List<Cabin> findByListId(String listId);

    //根据船编号删除其所有船舱
    int deleteByShipId(Long shipId);

    //根据卸货清单删除其所有船舱
    int deleteByListId(String listId);

    //更改某一船舱的载货量
    int updateCargoById(Long id, Float cargo);
}
